const Router = require("koa-router");
const router = new Router({ prefix: "/projects" });
const jwt = require("koa-jwt");
const { secret } = require("../config");
const auth = jwt({ secret });

const {
  get,
  all,
  info,
  create,
  modify,
  remove,
  package,
} = require("../controllers/projects");

router.get("/list", get);
router.get("/info", info);

router.get("/all", all);
router.post("/create", create);
router.put("/edit", modify);
router.put("/package/:id", package);

router.delete("/delete/:id", remove);

module.exports = router;
